﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/List.Master" AutoEventWireup="true" CodeBehind="ProjectCategory_List.aspx.cs" Inherits="Honestysoft.Financing.WebUI.Module.Project.ProjectCategory_List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script language="javascript" type="text/javascript">
    function openDialog2(url, width, height, title) {
        var obj = new Object();
        obj.name = title;
        var UrlTmp = url;
        UrlTmp += "&CategoryID=ProjectCategory";
        UrlTmp = escape(UrlTmp);
        var retValue = window.showModalDialog('<%=Honestysoft.Baseframework.WebUI.Globals.Home %>Scripts/ShowDlg.aspx?url=' + UrlTmp, obj, 'scroll:0;status:0;help:1;resizable:0;dialogWidth:' + width + 'px;dialogHeight:' + height + 'px');
        if (typeof (retValue) != "undefined" && retValue != null && retValue) {
            return true;
        }
        return false;
    }
</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">		
    <div class="query_area">
		&nbsp;&nbsp;
		项目类别名称：<asp:TextBox ID="txtDictName" runat="server"  cssClass="input2" MaxLength="200"></asp:TextBox>&nbsp;&nbsp;
        <asp:Button runat="server" ID="btnQuery" Text="查 找" CssClass="btn_normal" 
			onMouseOver="this.className='btn_active'" 
            onMouseOut="this.className='btn_normal'" OnClick="btnQuery_Click" />
    </div>            
    <div class="button_area">
        <asp:Button runat="server" ID="btnAdd" CssClass="btn_normal" 
			onMouseOver="this.className='btn_active'" 
            onMouseOut="this.className='btn_normal'" Text="新 增" 
            onclick="btnAdd_Click"/>
        <asp:Button runat="server" ID="btnDelete" CssClass="btn_normal" 
			onMouseOver="this.className='btn_active'" 
            onMouseOut="this.className='btn_normal'" Text="删 除" 
            OnClientClick="javascript:return getNoSelectionAlert('chkID','请选择要删除的记录后在执行此操作！');"             
            onclick="btnDelete_Click" />
		<asp:Button runat="server" ID="btnActive" CssClass="btn_normal" 
			onMouseOver="this.className='btn_active'" 
            onMouseOut="this.className='btn_normal'" Text="启 用" 
            OnClientClick="javascript:return getNoSelectionAlert('chkID','请选择要启用的记录后在执行此操作！');"                     
            onclick="btnActive_Click" />
        <asp:Button runat="server" ID="btnCancel" CssClass="btn_normal" 
			onMouseOver="this.className='btn_active'" 
            onMouseOut="this.className='btn_normal'" Text="禁 用" 
            OnClientClick="javascript:return getNoSelectionAlert('chkID','请选择要禁用的记录后在执行此操作！');"                     
            onclick="btnCancel_Click" />
    </div>
            
    <table cellpadding="0" width="100%" cellspacing="0" border="1" class="t1" id="tGrid">
		<thead>  
            <th align="center" width="30px">
                <input type="checkbox" name="chkAll" value="checkbox" onclick='javascript:checkAll(this,"chkID")' />
            </th>       
            <th align="center">项目类别名称</th>
            <th align="center" style="width:80px">是否有效</th>
            <th align="center" style="width:80px">是否默认</th>
            <th align="center" style="width:80px">排序号</th>
            <th width="120px">操作</th>
      	</thead>           
		<asp:Repeater runat="server" ID="rptList">
			<ItemTemplate>
				<tr>
					<td align="center" >
						<input type="checkbox" name="chkID" id="chk<%# DataBinder.Eval(Container.DataItem,"ID") %>"  value="<%# DataBinder.Eval(Container.DataItem,"ID") %>" >
					</td>
					<td align="left"><%#  DataBinder.Eval(Container.DataItem,"DictName") %></td>
					<td><%# Honestysoft.Baseframework.WebUI.ScriptHelper.Image.GetBooleanImage(DataBinder.Eval(Container.DataItem,"IsValid")) %></td>
                    <td><%# Honestysoft.Baseframework.WebUI.ScriptHelper.Image.GetBooleanImage(DataBinder.Eval(Container.DataItem,"IsDefault")) %></td>
					<td><%#  DataBinder.Eval(Container.DataItem,"SortCode") %></td>
					<td>
						<%# GetButtonScript(DataBinder.Eval(Container.DataItem,"ID")+"",Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "IsValid"))) %>
					</td>
				</tr>  
			</ItemTemplate>
		</asp:Repeater>
        <tr>
            <td colspan="6" style="line-height: 28px;text-align:left;">
                <frameworkwebcontrols:aspnetpager id="AspNetPager1" runat="server"
                    alwaysshow="true" firstpagetext="首页" lastpagetext="尾页" nextpagetext="下一页" pageindexboxtype="DropDownList"
                    prevpagetext="上一页" showpageindex="true" showcustominfosection="Right" submitbuttontext="Go"
                    textafterpageindexbox="页" textbeforepageindexbox="转到" currentpagebuttonposition="End"
                    layouttype="Div" custominfotextalign="Right" custominfohtml="共%RecordCount%条记录。第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条"
                    direction="LeftToRight" onpagechanged="AspNetPager1_PageChanged">
                </frameworkwebcontrols:aspnetpager>            
            </td>
        </tr>
    </table>
</asp:Content>